package com.qj.travel.service.impl;

import com.qj.travel.db.dao.VoteSettingDao;
import com.qj.travel.db.model.VoteSettingModel;
import com.qj.travel.service.VoteSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2016/10/17.
 */
@Service
public class VoteSettingServiceImpl implements VoteSettingService {

    @Autowired
    private VoteSettingDao voteSettingDao;
    public int selectUserVoteNum() {
        return voteSettingDao.selectUserVoteNum();
    }

    public int selectIpVoteNum() {
        return voteSettingDao.selectIpVoteNum();
    }

    public int updateUserVoteNum(int userVoteNum) {
        return voteSettingDao.updateUserVoteNum(userVoteNum);
    }

    public int updateIpVoteNum(int ipVoteNum) {
        return voteSettingDao.updateIpVoteNum(ipVoteNum);
    }

    public List<VoteSettingModel> getSetting() {
        return voteSettingDao.getSetting();
    }

    public int updateVoteNum(int userVoteNum, int ipVoteNum) {
        return voteSettingDao.updateVoteNum(userVoteNum,ipVoteNum);
    }
}
